<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<!--[if lt IE 9]>
	<script type="text/javascript" src="__PUBLIC__/lib/html5.js"></script>
	<script type="text/javascript" src="__PUBLIC__/lib/respond.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/lib/PIE_IE678.js"></script>
	<![endif]-->
	<link href="<%=request.getContextPath()%>/css/H-ui.min.css" rel="stylesheet" type="text/css" />
	<link href="<%=request.getContextPath()%>/css/H-ui.login.css" rel="stylesheet" type="text/css" />
	<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" />
	<link href="<%=request.getContextPath()%>/css/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
	<!--[if IE 6]>
	<script type="text/javascript" src="__PUBLIC__/static/h-ui/js/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script>
	<![endif]-->
	<title>新地中层人员岗位专项制度</title>

	<script type="text/javascript" src="<%=request.getContextPath()%>/js/easyui/jquery.min.js"></script>
	<script>
		//回车登陆
		$(document).ready(function(){
			document.onkeydown=function(event){
				if(event.keyCode==13){
					login();
				}
			};
		});

		function login() {
			var username = $("#userName").val();
			var passWord = $("#pwd").val();
			if (username == "") {
				$("#message").html('<p class="error">错误:用户名不能为空.</p>');
				return false;
			}
			if (passWord == "") {
				$("#message").html('<p class="error">错误:密码不能为空.</p>');
				return false;
			}
			$.ajax({
				type : "post",
				url : "<%=request.getContextPath()%>/account/login.do",
				data : {
					userName : username,
					pwd : passWord
				},
				dataType : "json",
				success : function(data) {
					if (data.isSuc) {
						window.location.href = "<%=request.getContextPath()%>/account/main.do" ;
					} else {
						$("#message").html('<p class="error">错误:'+data.msg+'</p>');
					}
				}
			});
		}
	</script>

	<style type="text/css">
		#message{width:100%;text-align:center}
		.success {
			color: green;
		}
		.error {
			color: red;
		}
	</style>

</head>
<body>
<div class="header"></div>
<div class="loginWraper">
	<div id="loginform" class="loginBox">
		<form class="form form-horizontal"  method="post">
			<div class="row cl">
				<div class="formControls col-xs-8 col-xs-offset-3">
					<label for="online" style="font-size: x-large;color: gray;">新地中层人员岗位专项制度</label>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
				<div class="formControls col-xs-8">
					<input id="userName" name="user_name" type="text" placeholder="用户名" class="input-text size-L">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
				<div class="formControls col-xs-8">
					<input id="pwd" name="password" type="password" placeholder="密码" class="input-text size-L">
				</div>
			</div>
			<div class="row cl">
				<div class="formControls col-xs-8 col-xs-offset-3">
					<input name="" type="button"  onclick="login()" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
				</div>
			</div>
		</form>
		<br/>
		<div id="message"></div>
	</div>
</div>
<div class="footer"></div>

</body>
</html>